package com.umgsai.thread.thread66;

//获取根线程组
public class Main2 {
	public static void main(String[] args) {
		System.out.println("当前线程名：" + Thread.currentThread().getName());
		System.out.println("所属线程组：" + Thread.currentThread().getThreadGroup().getName());
		System.out.println("当前线程所属线程组的父线程组名：" + Thread.currentThread().getThreadGroup().getParent().getName());
		System.out.println("当前线程所属线程组的父线程组的父线程组名：" + Thread.currentThread().getThreadGroup().getParent().getParent().getName());
	}
}
